package com.daogu.fuelcard.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

import java.math.BigDecimal;

@Schema(title = "交易记录")
public class TransactionRecord {

    @Schema(description = "主键id")
    private Integer id;

    @Schema(description = "卡号")
    @NotBlank(message = "卡号不能为空")
    @Size(min = 7,max = 10,message = "卡号长度7-10")
    private String cardNo;

    @Schema(description = "交易时间")
    @NotBlank(message = "交易时间不能为空")
    private String  tradingTime;

    @Schema(description = "交易金额")
    @NotNull(message = "交易金额不能为空")
    private BigDecimal totalPrice;

    @Schema(description = "校验状态")
    private Byte checkStatus;

    @Schema(description = "校验状态名称")
    private String checkStatusName;

    public TransactionRecord() {}

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getTradingTime() {
        return tradingTime;
    }

    public void setTradingTime(String tradingTime) {
        this.tradingTime = tradingTime;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public Byte getCheckStatus() {
        return checkStatus;
    }

    public void setCheckStatus(Byte checkStatus) {
        this.checkStatus = checkStatus;
    }


    public String getCheckStatusName() {
        return checkStatusName;
    }

    public void setCheckStatusName(String checkStatusName) {
        this.checkStatusName = checkStatusName;
    }

    @Override
    public String toString() {
        return "TransactionRecord{" +
                "id=" + id +
                ", cardNo='" + cardNo + '\'' +
                ", tradingTime='" + tradingTime + '\'' +
                ", totalPrice=" + totalPrice +
                ", checkStatus=" + checkStatus +
                ", checkStatusName='" + checkStatusName + '\'' +
                '}';
    }
}
